import request from '@/utils/request'

// 获取权限的列表数据
export function getPermissionList(){
    return request({
        url:'/sys/permission',
        method: 'get'
    })
}
//添加权限
export function addPermission(data){
    return request({
        url: '/sys/permission',
        method: 'post',
        data
    })
}
//删除权限
export function deletePermission(id){
    return request({
        url:`/sys/permission/${id}`,
        method:'delete'
    })
}
//根据id查询
export function getPermissionById(id){
    return request({
        url:`/sys/permission/${id}`,
        method:'get'
    })
}
//编辑权限
export function updatePermission(data){
    return request({
        url:`/sys/permission/${data.id}`,
        method:'put',
        data
    })
}
